<template>
  <view class="address_edit_box">
    <form @submit="formSubmit">
      <view>
        <view class="list_item">
          <view class="title">收货人姓名</view>
          <view class="input">
            <input type="text" class="text_font" @input="receiverName" :value="editInfo.receiverName"
              placeholder-style="color:#c6c6c6;" placeholder="请输入" />
          </view>
        </view>
        <view class="list_item">
          <view class="title">联系电话</view>
          <view class="input">
            <input type="number" class="text_fontnum" @input="mobile" maxlength="11" :value="editInfo.receiverMobile"
              placeholder-style="color:#c6c6c6;" placeholder="请输入" />
          </view>
        </view>
        <view class="list_item list_item_address" @click="openAddressPickerNew" :data-index="3">
          <view class="title" @click.stop="stopClick" style="width: 140rpx;">所在地区</view>
          <view class="input" style="line-height: 40rpx;">
            <view v-if="hasGetAddressData" :style="{color: datalist[0] == '请选择省' ? '#c6c6c6': '#757575'}">
              <text>{{ datalist[0] == '请选择省' ? '省' :  datalist[0].areaName }}</text>
              <text class="separate-tag"> - </text>
              <text>{{ datalist[1] == '请选择市' ? '市' :  datalist[1].areaName }}</text>
              <text class="separate-tag"> - </text>
              <text>{{ datalist[2] == '请选择区' ? '区' :  datalist[2].areaName }}</text>
              <text class="separate-tag" v-if="datalist.length > 3"> - </text>
              <text>{{ datalist[3] == '请选择街道' ? '街道' :  datalist[3].areaName }}</text>
            </view>
          </view>
          <image class="right_icon"
            src="https://100000063-1252208446.file.myqcloud.com/images/macallan-remvp/right_icon.png"></image>
        </view>
        <view class="list_item">
          <view class="title">详细地址</view>
          <view class="input">
            <input type="text" class="text_font" @input="addressDetail" :value="editInfo.receiverAddress"
              placeholder-style="color:#c6c6c6;" placeholder="请输入" />
          </view>
        </view>
        <view class="list_item" style="border: none;">
          <view class="title">设置为默认</view>
          <view class="input" @click="changeCheckBoxState">
            <image v-if="isDefult" class="defult_img"
              src="https://100000063-1252208446.file.myqcloud.com/images/macallan-remvp/sel_img.png"></image>
            <image v-else class="defult_img"
              src="https://100000063-1252208446.file.myqcloud.com/images/macallan-remvp/nosel_img.png"></image>
          </view>
        </view>
        <image class="line_img"
          src="https://100000063-1252208446.file.myqcloud.com/images/macallan-remvp/empty_cart_line3x_981.png"></image>
      </view>
      <view class="bottom_box">
        <view class="tipBox">
          温馨提示：请您不要将未成年人作为订单收件人或让未成年人接收或接触所购买的酒类商品。
        </view>
        <view class="btn_box">
          <button class="btnStyle" formType="submit">修改</button>
        </view>
      </view>
      <view class="add-address-mask" v-if="popup" @touchmove.stop.prevent="moveHandle">
        <view class="content_box">
          <!-- stepsList步骤条样式显示省市区 -->
          <stepsList id="setp-list-id" :isIos="isIos" :datalist="datalist" :addressindex="addressindex" @click="clickShowCityList"
            :showIndex="showIndex" @closeMask="closeMask" @clickCancel="clickCancel"></stepsList>
          <view style="position: relative;"
            :class="datalist[0] == '请选择省' ? 'max-height' : datalist[1] == '请选择市' && datalist[2] == '请选择区' ? 'sec-height' : datalist[2] == '请选择区' && datalist.length == 4 || datalist.length == 3 ? 'third-height' : 'fouth-height'">
            <uni-indexed-list :options="list" :clickAreaCode="clickAreaCode" :addressindex="addressindex"
              :clickAreaName="clickAreaName" :showSelect="false" @click="bindClick"></uni-indexed-list>
          </view>
        </view>
      </view>
    </form>
		<!-- 弱提示 弹窗 -->
		<toast-popup ref="toastPopup" @onToastPopupClick="onToastPopupClick"></toast-popup>
  </view>
</template>
<script>
  import api from '@/api/api';
  import {
    CUSTOMER_INFO
  } from '@/utils/constant';
  import AreaPicker from './areaPicker';
  import uniIndexedList from '@/components/uni-indexed-list/uni-indexed-list.vue';
  import stepsList from '@/components/fanxiao-address/steps-list.vue';
  import {
    buildTextData
  } from '@/common/indexed-list.js';
  export default {
    data() {
      return {
        isDefult: false,
        isCheck: false,
        editInfo: {
          receiverName: '',
          receiverAddress: '',
          receiverMobile: ''
        },
        id: '',
        province: '',
        city: '',
        area: '',
        provinceCode: '',
        cityCode: '',
        areaCode: '',
        provinceName: '',
        cityName: '',
        areaName: '',
        type: '',
        popup: false,
        areaParams: null,
        list: [],
        datalist: ['请选择省', '请选择市', '请选择区', '请选择街道'],
        addressindex: 0,
        codelist: [],
        areaTypeList: ['state', 'city', 'district', 'town'],
        clickAreaCode: -1,
        clickAreaName: '',
        showIndex: -1,
        userArea: null

        // hasGetAddressData: false
      };

    },

    components: {
      areaPicker: AreaPicker,
      uniIndexedList: uniIndexedList,
      stepsList: stepsList,
    },
    props: {
      fromPage: {
        typeof: String
      },
      navFlag: {
        typeof: String
      },
      hasGetAddressData: {
        typeof: Boolean
      },
      isIos:{
        typeof: Boolean
      }
    },
    methods: {
			/**
			 * 展示弱提示
			 * @param {Object} msg 文案
			 */
			handleShowTextToast(msg){
				try{
					this.$refs.toastPopup.showToast(msg);
				}catch(e){}
			},
			/**
			 * 若提示按钮点击回调
			 * @param {Object} data.type 类型：confirm确定，cancel取消
			 * @param {Object} data.callBackData 呼气弹窗时传入的数据
			 */
			onToastPopupClick(data){},
      getHeight() {
        //       let info = uni.createSelectorQuery().select(".test");
        // 　　　  　info.boundingClientRect(function(data) { //data - 各种参数
        // 　　    }).exec()
        // const query = uni.createSelectorQuery().in(this);
        // query.select('#test').boundingClientRect(data => {
        //   debugger
        // }).exec();
        // const query = uni.createSelectorQuery();
        // query.select('#setp-list-id').boundingClientRect();
        // query.selectViewport().scrollOffset();
        // query.exec(function(res) {
        //   // uni.pageScrollTo({
        //   //   scrollTop: res[0].top + res[1].scrollTop,
        //   //   duration: 300
        //   // });
        // });
      },
      stopClick() {
        return false
      },

      moveHandle() {
        return
      },
      getcity(adcode, areaType) {
        let that = this
        this.getHeight()
        let subdistrict = this.addressindex + 1;
        // 广东省东莞市 441900000
        // 广东省中山市 442000000
        // 海南省儋州市 460400000
        if (adcode == 441900000 || adcode == 442000000 || adcode == 460400000) {
          this.$commonFunction.getFourthLevelAddress(1, that.areaTypeList[that.addressindex + 1], adcode).then((
            res) => {
            if (!!areaType) {
              if (areaType == "state") {
                this.datalist = [this.datalist[0], '请选择市', '请选择区']
                this.codelist = [this.codelist[0]]
                this.showIndex = 1
              } else if (areaType == "city") {
                this.datalist = [this.datalist[0], this.datalist[1], '请选择区']
                this.codelist = [this.codelist[0], this.codelist[1]]
                this.showIndex = 2
              } else if (areaType == "district") {
                this.datalist = [this.datalist[0], this.datalist[1], this.datalist[2]]
                this.codelist = [this.codelist[0], this.codelist[1], this.codelist[2]]
                this.showIndex = 3
              }
              //  else if (areaType == "town") {
              //   this.datalist = [this.datalist[0], this.datalist[1], this.datalist[2], this.datalist[3]]
              //   this.codelist = [this.codelist[0], this.codelist[1], this.codelist[2], this.codelist[3]]
              //   this.showIndex = 4
              // }
            }
            this.list = buildTextData(res.data.content);
          }).catch((err) => {});
        } else {
          this.$commonFunction.getFourthLevelAddress(1, that.areaTypeList[that.addressindex], adcode).then((res) => {
            if (!!areaType) {
              if (areaType == "state") {
                this.datalist = [this.datalist[0], '请选择市', '请选择区', '请选择街道']
                this.codelist = [this.codelist[0]]
                this.showIndex = 1
              } else if (areaType == "city") {
                this.datalist = [this.datalist[0], this.datalist[1], '请选择区', '请选择街道']
                this.codelist = [this.codelist[0], this.codelist[1]]
                this.showIndex = 2
              } else if (areaType == "district") {
                this.datalist = [this.datalist[0], this.datalist[1], this.datalist[2], '请选择街道']
                this.codelist = [this.codelist[0], this.codelist[1], this.codelist[2]]
                this.showIndex = 3
              } else if (areaType == "town") {
                this.datalist = [this.datalist[0], this.datalist[1], this.datalist[2], this.datalist[3]]
                this.codelist = [this.codelist[0], this.codelist[1], this.codelist[2], this.codelist[3]]
                this.showIndex = 4
              }
            }
            this.list = buildTextData(res.data.content);
          }).catch((err) => {});
        }

      },
      // 点击省市区信息
      bindClick(e) {
        // this.flag = true
        this.clickAreaCode = e.clickAreaCode
        this.clickAreaName = e.clickAreaName
        // code存起来
        let codelist = this.codelist;
        codelist[this.addressindex] = e.item.name.areaCode;
        this.codelist = codelist;
        this.datalist[this.addressindex] = e.item.name;
        // this.addressindex ==4 ? '': this.addressindex = this.addressindex + 1
        if (this.addressindex == 3 || this.addressindex == 2 && e.clickAreaCode.slice(6, 9) !== '000') {
          if (this.addressindex == 2 && e.clickAreaCode.slice(6, 9) !== '000' && (this.datalist[1].areaCode ==
              '441900000' || this.datalist[1].areaCode == '442000000' || this.datalist[1].areaCode == '460400000')) {
            this.datalist = this.datalist.slice(0, 3)
          }
          // 选择完毕后隐藏
          // this.popup = false;
          // this.choose_show = false;
        } else {
          this.addressindex = this.addressindex + 1;
          this.getcity(e.item.name.areaCode, e.item.name.areaType);
        }
      },
      closeMask() {
        this.popup = false;
      },
      clickShowCityList(n) {
        let code = '';
        let nIndex = n
        this.flag = false
        this.addressindex = n;
        if (n == 0) {
          this.clickAreaCode = this.datalist[n].areaCode || -1
          this.clickAreaName = typeof(this.datalist[n]) == "object" ? this.datalist[n].areaName : ""
          code = '';
        } else {
          this.clickAreaCode = this.datalist[n].areaCode || -1
          this.clickAreaName = typeof(this.datalist[n]) == "object" ? this.datalist[n].areaName : ""
          code = this.codelist[nIndex - 1];
        }
        let hasChooseIndex = -1
        for (var i = 0; i < this.datalist.length; i++) {
          if (typeof(this.datalist[i]) == "string") {
            hasChooseIndex = i
            this.showIndex = i
            break
          }
        }
        this.showIndex = this.showIndex == -1 ? 3 : this.showIndex
        this.getcity(code, false);
      },
      // 点击请选择省市区区域
      ckSteps(n) {
        // 点击地址-》省市区
        let data_frist = ['请选择省', '请选择市', '请选择区', '请选择街道'];
        this.addressindex = n;
        let code = '';
        let nIndex = n
        if (this.datalist[0].areaCode == '0000000' && n !== 0) {
          this.datalist = ['请选择省', '请选择市', '请选择区', '请选择街道']
          this.codelist = []
          this.addressindex = 0
          n = 0
        }
        if (typeof(this.datalist[0]) == "object" && nIndex > 0 && typeof(this.datalist[0]) == "string") {
          this.datalist.forEach(function(item, index, array) {
            if (typeof(item) == "string" && typeof(array[index - 1]) == "object") {
              nIndex = index
            }
          })
        }
        if (typeof(this.datalist[n]) == 'string') {
          if (n == 0) {
            this.datalist = data_frist;
            this.codelist = [];
            code = '';
          } else {
            let datalist = this.datalist;
            datalist = datalist.splice(0, nIndex);
            data_frist = data_frist.splice(nIndex, data_frist.length);
            datalist = datalist.concat(data_frist);
            this.datalist = datalist;
            code = this.codelist[nIndex - 1];
          }
        } else {
          this.clickAreaCode = this.datalist[n].areaCode || -1
          this.clickAreaName = typeof(this.datalist[n]) == "object" ? this.datalist[n].areaName : ""
          code = this.codelist[n - 1]
        }
        this.getcity(code);
      },
      conceal(param) {
        // 获取到传过来的 省 市 区 县数据
        this.areaParams = param
        // 选择完毕后隐藏
        this.popup = false;

      },
      setOrgType(type) {
        this.type = type;
      },
      // 姓名
      receiverName(e) {
        this.editInfo.receiverName = e.detail.value;
      },

      // 手机号
      mobile(e) {
        this.editInfo.receiverMobile = e.detail.value;
      },

      // 详细地址
      addressDetail(e) {
        this.editInfo.receiverAddress = e.detail.value;
      },

      editAddress: async function(address) {
        let that = this;
        let customerInfo = uni.getStorageSync(CUSTOMER_INFO)
        let isDefult = 0;
        if (this.isDefult) {
          isDefult = 1;
        }
        let customerId = customerInfo.customerId;
        let jwt = uni.getStorageSync(CUSTOMER_INFO).jwt;
        const json = await api.updateAddress({
            method: 'PUT',
            header: {
              jwt: jwt
            },
            query: {
              areaCode: that.areaCode ? that.areaCode : this.editInfo.areaCode,
              customerId: customerId,
              isDefault: isDefult,
              receiverAddress: address.addressDetail,
              receiverMobile: address.mobile,
              receiverName: address.receiverName,
              receiverState: that.datalist[0].areaName,
              receiverCity: that.datalist[1].areaName,
              receiverDistrict: that.datalist[2].areaName,
              receiverTown: that.datalist.length > 3 ? that.datalist[3].areaName : '',
              areaCode: that.datalist.length > 3 ? that.datalist[3].areaCode : that.datalist[2].areaCode
              // receiverState: that.provinceName ? that.provinceName : this.editInfo.receiverState,
              // receiverCity: that.cityName ? that.cityName : this.editInfo.receiverCity,
              // receiverDistrict: that.areaName ? that.areaName : this.editInfo.receiverDistrict
            }
          },
          customerId,
          this.id
        );
        if (json.code === 1000) {
          this.editInfo = {};
          //0 列表 1新增 2编辑 (显示列表)
          if (this.fromPage == 'order') {
            uni.navigateBack({
              delta: -1
            })
          }
          // 在会员礼遇点击街道弹窗立即完善跳到编辑非点击编辑
          if (this.fromPage == 'gift' && this.navFlag == 3) {
            this.getAddressInfo(this.id);
            return
          }
          this.$emit('currentPage', 0);
          if (this.type == 'gift') {
            this.$parent.getUserAddress('', true);
          } else {
            this.$parent.getUserAddress();
          }
          this.province = '';
          this.city = '';
          this.area = '';
          this.provinceName = '';
          this.cityName = '';
          this.areaName = '';
          this.provinceCode = '';
          this.cityCode = '';
          this.areaCode = '';
        } else {
					this.handleShowTextToast(json.msg);
        }
        that.showLoading = false;
      },
      getAddressInfo: async function(id) {
        let customerInfo = uni.getStorageSync(CUSTOMER_INFO);
        let customerId = customerInfo.customerId;
        let jwt = customerInfo.jwt;

        // 获取顾客地址信息
        const json = await api.getAddressInfoById({
            header: {
              jwt: jwt
            }
          },
          customerId,
          id
        );
        if (json.code === 1000) {
          this.$emit('setDeafaultAddress', {
            info: json.data,
            type: 'edit'
          })
        }
      },
      changeCheckBoxState() {
        this.isCheck = !this.isCheck;
        this.isDefult = !this.isDefult;
      },
      formSubmit(e) {
        let that = this;
        let receiverName = that.editInfo.receiverName;
        let newAddressInfo = {};
        let mobile = that.editInfo.receiverMobile;
        let addressDetail = that.editInfo.receiverAddress;
        receiverName = !!receiverName ? receiverName.trim() : receiverName;
        receiverName = receiverName.replace(
          /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]|[\uD800-\uDBFF]|[\uDC00-\uDFFF]|[^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac\r\n]/g,
          ''
        );
        addressDetail = addressDetail.replace(
          /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]|[\uD800-\uDBFF]|[\uDC00-\uDFFF]|[^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac\r\n]/g,
          ''
        );
        if (!receiverName) {
					this.handleShowTextToast('输入收货人姓名');
          return false;
        }
        if (mobile == '') {
					this.handleShowTextToast('输入联系电话');
          return false;
        } else if (mobile.length < 11) {
					this.handleShowTextToast('手机号长度有误');
          return false;
        }
        const myreg = /^(1[3|4|5|6|7|8|9])\d{9}$/;
        if (!myreg.test(mobile)) {
					this.handleShowTextToast('手机号格式有误');
          return false;
        }
        if (this.datalist.length == 4 && typeof(this.datalist[3]) !== "object" || this.datalist.length == 3 && typeof(
            this.datalist[2]) !== "object") {
					this.handleShowTextToast('请完善所在地区');
          return false;
        }
        if (!addressDetail) {
					this.handleShowTextToast('请输入详细地址信息');
          return false;
        }
        newAddressInfo.receiverName = receiverName;
        newAddressInfo.mobile = that.editInfo.receiverMobile;
        newAddressInfo.addressDetail = addressDetail;
        this.editAddress(newAddressInfo);
      },
      clickCancel(){
        this.refresh(this.userArea)
        this.popup = false;
      },
      // 由address父组件发送来的数据
      refresh(val) {
        this.userArea = val
        let that = this
        // that.hasGetAddressData = false
        if (val === undefined) return;
        this.editInfo = val;
        this.id = this.editInfo.customerAddressId;
        if (this.editInfo.isDefault === 1) {
          this.isDefult = true;
        } else {
          this.isDefult = false;
        }

        this.province = {
          code: this.editInfo.provinceCode,
          areaName: this.editInfo.receiverState
        };
        this.city = {
          code: this.editInfo.areaCode,
          areaName: this.editInfo.receiverCity
        };
        this.area = {
          code: this.editInfo.areaCode,
          areaName: this.editInfo.receiverDistrict
        };
        if (val.areaCode.slice(0, 4) == 4419 || val.areaCode.slice(0, 4) == 4420 || val.areaCode.slice(0, 4) == 4604) {
          this.showIndex = 2
          this.clickAreaCode = val.areaCode
          this.codelist = [val.areaCode.slice(0, 2) + '0000000', val.areaCode.slice(0, 4) + '00000', val.areaCode.slice(
            0, 6) + '000', ]
          this.datalist = [{
            'areaCode': val.areaCode.slice(0, 2) + '0000000',
            'areaName': val.receiverState,
            'areaType': "state",
            'parentCode': "000000000"
          }, {
            'areaCode': val.areaCode.slice(0, 4) + '00000',
            'areaName': val.receiverCity,
            'areaType': "city",
            'parentCode': val.areaCode.slice(0, 2) + '0000000'
          }, {
            'areaCode': val.areaCode,
            'areaName': val.receiverDistrict,
            'areaType': "district",
            'parentCode': val.areaCode.slice(0, 4) + '00000'
          }]
        } else {
          if (val.areaCode.slice(6, 9) !== '000') {
            this.showIndex = 3
            this.clickAreaCode = val.areaCode
          }
          this.codelist = [val.areaCode.slice(0, 2) + '0000000', val.areaCode.slice(0, 4) + '00000', val.areaCode.slice(
            0, 6) + '000', ]
          this.datalist = [{
            'areaCode': val.areaCode.slice(0, 2) + '0000000',
            'areaName': val.receiverState,
            'areaType': "state",
            'parentCode': "000000000"
          }, {
            'areaCode': val.areaCode.slice(0, 4) + '00000',
            'areaName': val.receiverCity,
            'areaType': "city",
            'parentCode': val.areaCode.slice(0, 2) + '0000000'
          }, {
            'areaCode': val.areaCode.slice(0, 6) + '000',
            'areaName': val.receiverDistrict,
            'areaType': "district",
            'parentCode': val.areaCode.slice(0, 4) + '00000'
          }, '请选择街道']
          if (!!val.receiverTown) {
            this.datalist[3] = {
              'areaCode': val.areaCode,
              'areaName': val.receiverTown,
              'areaType': "town",
              'parentCode': val.areaCode.slice(0, 6) + '000',
            }

          }
        }
        this.$emit("hasGetAddress", true)
        // setTimeout(() => {
        // 	this.$emit("hasGetAddress",true)
        // }, 80);
        // setTimeout(function() {
        // this.hasGetAddressData = true
        // }, 200);
      },
      openAddressPicker() {
        this.$refs.areaPicker.openAddressPicker();
      },
      openAddressPickerNew(e) {
        let hasChooseIndex = -1
        for (var i = 0; i < this.datalist.length; i++) {
          if (typeof(this.datalist[i]) == "string") {
            hasChooseIndex = i
            this.showIndex = i
            break
          }
        }
        let maxIndex = this.datalist.length == 3 ? 2 : 3
        this.showIndex = this.showIndex == -1 ? maxIndex : this.showIndex
        let chooseIdx = hasChooseIndex == -1 ? e.currentTarget.dataset.index : hasChooseIndex
        if (this.datalist.length == 3 && chooseIdx == 3) {
          this.clickAreaName = typeof(this.datalist[chooseIdx - 1]) == "object" ? this.datalist[chooseIdx - 1]
            .areaName : ""
          this.clickAreaCode = this.datalist[chooseIdx - 1].areaCode || -1

          this.ckSteps(chooseIdx - 1)
        } else {
          this.clickAreaName = typeof(this.datalist[chooseIdx]) == "object" ? this.datalist[chooseIdx].areaName : ""
          this.clickAreaCode = this.datalist[chooseIdx].areaCode || -1
          this.ckSteps(chooseIdx)
        }

        this.popup = true
      },
      areaPickerArray(province, city, area) {
        this.province = province;
        this.city = city;
        this.area = area;
        this.provinceName = province.areaName;
        this.cityName = city.areaName;
        this.areaName = area.areaName;
        this.provinceCode = province.areaCode;
        this.cityCode = city.areaCode;
        this.areaCode = area.areaCode;
      }
    },

    onShow() {
      this.province = {
        code: '120000',
        name: '天津市'
      };
      this.city = {
        code: '120100',
        name: '天津市'
      };
      this.area = {
        code: '120101',
        name: '和平区'
      };
      this.$refs.areaPicker.setAddressPickerValue(this.province, this.city, this.area);
    }
  };
</script>
<style lang="less">
  .address_edit_box {
    background: #fff;
    padding: 0 48rpx;
    width: 100%;
    font-family: FrankNew-Regular, NotoSansSC-Regular;
  }

  .text_font {
    font-family: FrankNew-Regular, NotoSansSC-Regular;
  }

  .text_fontnum {
    font-family: FrankNew-Regular;
  }

  .list_item_address {
    height: auto !important;
    padding: 48rpx 0 !important;
  }

  .list_item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f2f2f2;
    height: 144rpx;

    .title {
      width: 230rpx;
      height: 64rpx;
      line-height: 64rpx;
      font-size: 28rpx;
      color: #1a1a1a;
    }

    .input {
      flex: 1;
      text-align: right;
      min-height: 64rpx;
      line-height: 64rpx;
      display: flex;
      align-items: center;
      justify-content: flex-end;

      input {
        width: 100%;
        height: 64rpx;
        line-height: 64rpx;
        color: #757575;
        font-size: 24rpx;
      }
    }
  }

  .btn_box {
    margin-top: 20rpx;

    .btnStyle {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 654rpx;
      height: 80rpx;
      border-radius: 48rpx 16rpx 48rpx 48rpx;
      font-size: 28rpx;
      color: #ffffff;
      background-color: #000;
      padding: 0;
    }
  }

  .tipBox {
    margin-top: 230rpx;
    font-size: 20rpx;
    text-align: center;
    color: #757575;
  }

  .mask {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1b1b1b2b;
    z-index: 0;
  }

  .content_box {
    width: 100%;
    height: 1200rpx;
    /* height: 600upx; */
    background: white;
    z-index: 11;
    position: fixed;
    bottom: 0;
    left: 0;
  }

  .separate-tag {
    padding: 0 10rpx;
  }

  .add-address-mask {
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
  }

  .addressList {
    height: 350px;
    position: relative;
  }

  .max-height {
    height: 621rpx;
  }

  .sec-height {
    height: 539rpx;
  }

  .third-height {
    height: 455rpx;
  }

  .fouth-height {
    height: 368rpx;
  }

  .defult_img {
    width: 32rpx;
    height: 32rpx;
    margin: 16rpx;
  }

  .line_img {
    width: 100%;
    height: 12rpx;
    margin-top: 48rpx;
  }

  .weixin_get_address {
    width: 100%;
    height: 138rpx;
  }

  .right_icon {
    width: 64rpx;
    height: 64rpx;
    margin-left: 16rpx;
  }

  .qAdd {
    width: 100%;
    height: 138rpx;
    text-align: center;
    font-family: NotoSansSC-Regular;
    font-size: 28rpx;
    font-weight: 500;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .qAdd_text {
    border-bottom: 1px solid #000;
    padding-bottom: 6px;
    text-align: center;
    line-height: 1;
  }

  .bottom_box {
    width: 100%;
    position: fixed;
    left: 0;
    bottom: 64rpx;
    padding: 0 48rpx;
  }
</style>
